package spec.ocl_mcg;

import graph.mcg.CGNode;
import graph.mcg.ConstraintNode;

import org.eclipse.ocl.ecore.IntegerLiteralExp;


public class IntegerLiteralExpNode extends TreeNode implements LeafNode {
	private int value;
	
	public IntegerLiteralExpNode(){}
	
	public IntegerLiteralExpNode(IntegerLiteralExp exp){
		value = exp.getIntegerSymbol();
		expresult = exp.getIntegerSymbol().toString();
	}
	
	public int getValue() {
		return value;
	}

	public void setValue(int value) {
		this.value = value;
	}

	@Override
	public CGNode toCG() {
		// TODO Auto-generated method stub
		ConstraintNode cfgnode = new ConstraintNode(this);
		cfgnode.setConstraint(Integer.toString(value));
		cfgnode.setNextnode(null);
		
		return cfgnode;
	}

	@Override
	public String toString() {
		// TODO Auto-generated method stub
		return null;
	}

}
